package com.wondertek.poms.dao.po;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 节目免流量配置
 * @author chyx
 *
 */

@Data
@Entity
@Table(name = "PRD_FREE_FLOW")
@DynamicUpdate
@DynamicInsert
@Proxy(lazy = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PrdFreeFlow implements Serializable {

	private static final long serialVersionUID = 1879580028875818463L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "PRD_FREE_FLOW_SEQ")
	@SequenceGenerator(name = "PRD_FREE_FLOW_SEQ", allocationSize = 1, sequenceName = "PRD_FREE_FLOW_SEQ")
	@Column(name = "ID")
	private Long id;
	@Column(name = "POMS_TYPE")
	private Integer pomsType;//1:产品包，2:节目
	@Column(name = "POMS_ID")
	private Long pomsId;//产品包ID或节目ID
	@Column(name = "YEAR_FROM")
	private String yearFrom; //从何年开始
	@Column(name = "YEAR_TO")
	private String yearTo;   //到何年结束
	@Column(name = "MONTH_FROM")
	private String monthFrom;//从几月开始，1
	@Column(name = "MONTH_TO")
	private String monthTo;//到几月结束(包含)，5
	@Column(name = "WEEK_FROM")
	private String weekFrom;//从周几开始，Calendar.MONDAY
	@Column(name = "WEEK_TO")
	private String weekTo;//到周几结束(包含)，Calendar.MONDAY
	@Column(name = "DAY_FROM")
	private String dayFrom;//从几日开始，20
	@Column(name = "DAY_TO")
	private String dayTo;//到几日结束(包含)，31
	@Column(name = "TIME_FROM")
	private String timeFrom;//从几点开始，10:00:00
	@Column(name = "TIME_TO")
	private String timeTo;//到几点结束(包含)，13:00:00


}
